package com.xingkeduo.dto.transter.marketingbagdetail;

import java.util.List;

import com.alibaba.fastjson.JSONObject;
import com.xingkeduo.dto.transter.marketingdetail.MarketingDetail;

import lombok.Data;

@Data
public class MarketingBagDetail {
	private String id;//券，卡ID
	private String marketing_type;//类型
	private String title;//券，卡名称
	private String coupon_count;//券数量
	private String card_count;//卡数量
	private List<MarketingDetail> marketing_detail_list;
	private String use_memo;
	private String unreason;
	private int tips_status;
	
	public void covert(JSONObject json) {
		this.id = json.getOrDefault("id", "")==null?"":json.getOrDefault("id", "").toString();
		this.title = json.getOrDefault("name", "")==null?"":json.getOrDefault("name", "").toString();
		this.marketing_type = json.getOrDefault("marketingType", "")==null?"":json.getOrDefault("marketingType", "").toString();
		this.use_memo = json.getOrDefault("useMomo", "")==null?"":json.getOrDefault("useMomo", "").toString();
	}
}
